package com.sfexpress.tools.entity;

/**
 * mysql列级约束信息, 从information_schema.KEY_COLUMN_USAGE获取<br>
 * 
 * @author CrazyPig
 *
 */
public class MysqlColumnConstInfo {
	
	/**
	 * 
	 * 
+-------------------------------+--------------+------+-----+---------+-------+
| Field                         | Type         | Null | Key | Default | Extra |
+-------------------------------+--------------+------+-----+---------+-------+
| CONSTRAINT_CATALOG            | varchar(512) | NO   |     |         |       |
| CONSTRAINT_SCHEMA             | varchar(64)  | NO   |     |         |       |
| CONSTRAINT_NAME               | varchar(64)  | NO   |     |         |       |
| TABLE_CATALOG                 | varchar(512) | NO   |     |         |       |
| TABLE_SCHEMA                  | varchar(64)  | NO   |     |         |       |
| TABLE_NAME                    | varchar(64)  | NO   |     |         |       |
| COLUMN_NAME                   | varchar(64)  | NO   |     |         |       |
| ORDINAL_POSITION              | bigint(10)   | NO   |     | 0       |       |
| POSITION_IN_UNIQUE_CONSTRAINT | bigint(10)   | YES  |     | NULL    |       |
| REFERENCED_TABLE_SCHEMA       | varchar(64)  | YES  |     | NULL    |       |
| REFERENCED_TABLE_NAME         | varchar(64)  | YES  |     | NULL    |       |
| REFERENCED_COLUMN_NAME        | varchar(64)  | YES  |     | NULL    |       |
+-------------------------------+--------------+------+-----+---------+-------+
	 * 
	 * 
	 * 
	 */
	
	private String constraintName;
	private String columnName;
	private String posInUniqConst;
	private String refTableSchema;
	private String refTableName;
	private String refColumnName;
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("[")
			.append("constraintName = " + this.constraintName + ", ")
			.append("columnName = " + this.columnName + ", ")
			.append("posInUniqConst = " + this.posInUniqConst + ", ")
			.append("refTableSchema = " + this.refTableSchema + ", ")
			.append("refTableName = " + this.refTableName + ", ")
			.append("refColumnName = " + this.refColumnName)
			.append("]");
		return sb.toString();
	}
	
	public String getConstraintName() {
		return constraintName;
	}
	public void setConstraintName(String constraintName) {
		this.constraintName = constraintName;
	}
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getPosInUniqConst() {
		return posInUniqConst;
	}
	public void setPosInUniqConst(String posInUniqConst) {
		this.posInUniqConst = posInUniqConst;
	}
	public String getRefTableSchema() {
		return refTableSchema;
	}
	public void setRefTableSchema(String refTableSchema) {
		this.refTableSchema = refTableSchema;
	}
	public String getRefTableName() {
		return refTableName;
	}
	public void setRefTableName(String refTableName) {
		this.refTableName = refTableName;
	}
	public String getRefColumnName() {
		return refColumnName;
	}
	public void setRefColumnName(String refColumnName) {
		this.refColumnName = refColumnName;
	}
	
}
